package com.hello.booksale.service;

import com.hello.booksale.dao.OrderDao;
import com.hello.booksale.entity.OrderEntity;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class OrderService {
    @Resource
    private OrderDao orderDao;

    public List<OrderEntity>selectOrder(String userName){
        List<OrderEntity>list=orderDao.selectOrderByUserName(userName);
        return list;
    }
    public void insertOrder(OrderEntity orderEntity){
        orderDao.insertOrder(orderEntity);
    }
}
